import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
  state:{
    user:{
      username:'访客',
      code:''
    },
    login:false,
    pagewidth:0,
    tag:null,
    viewing:false,
  },
  mutations:{
    setUser(state,user){
      state.user=user;
    },
    setlogin(state,f){
      state.login=f
    },
    setWidth(state,width){
      state.pagewidth=width;
    },
    setTag(state,tag){
      state.tag=tag;
    },
    setViewing(state,viewing){
      state.viewing=viewing;
    }
  }
})
